﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.StockContext;
using SlamDunk.MES.ReportView.Models;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.StockContext
{
    /// <summary>
    /// 出/入库记录仓储接口
    /// </summary>
    public interface IBoundRecordRepository : IAggRootRepository<BoundRecord>
    {
        #region # 分页获取出/入库记录列表 —— ICollection<BoundRecord> FindByPage(Guid? materialId...
        /// <summary>
        /// 分页获取出/入库记录列表
        /// </summary>
        /// <param name="materialId">物料定义Id</param>
        /// <param name="materialLotId">物料批次Id</param>
        /// <param name="directionType">出/入库方向类型</param>
        /// <param name="storageLocationType">储存位置类型</param>
        /// <param name="storageLocationId">储存位置Id</param>
        /// <param name="stockOrderClassId">库存单据类Id</param>
        /// <param name="stockOrderId">库存单据Id</param>
        /// <param name="facilityIds">工厂模型Id集</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>出/入库记录列表</returns>
        ICollection<BoundRecord> FindByPage(Guid? materialId, Guid? materialLotId, StockDirectionType? directionType, StorageLocationType? storageLocationType, string storageLocationId, Guid? stockOrderClassId, Guid? stockOrderId, IList<Guid> facilityIds, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion

        #region # 获取作业计划物料概要列表 —— ICollection<MaterialSummaryInfo> GetMaterialSummariesByExecutionPlan(...
        /// <summary>
        /// 获取作业计划物料概要列表
        /// </summary>
        /// <param name="executionPlanId">作业计划Id</param>
        /// <param name="directionType">出/入库类型</param>
        /// <returns>物料概要列表</returns>
        ICollection<MaterialSummaryInfo> GetMaterialSummariesByExecutionPlan(Guid executionPlanId, StockDirectionType directionType);
        #endregion
    }
}
